SUPPORT / SAMPLES & SAS NOTES
 

Support

Problem Note 36636: "ERROR: Invalid memptr" occurs when accessing an SQL view defined with an embedded libname using the META engine

DetailsAboutRate It

The following error message is produced when reading from an SQL view that is created with an embedded LIBNAME statement that specifies the META engine:

ERROR: Invalid memptr.

For example, suppose you defined the following view from the table INVALID_MEMPTR_TEST that is accessed from the "Test Library" metadata library via the META engine:

proc sql; create view work.INVALID_MEMPTR_VIEW AS select * from test.INVALID_MEMPTR_TEST using libname test META library="Test Library"; run;

The error occurs when reading the view, as in these two steps:

data read_view; set work.INVALID_MEMPTR_VIEW; run proc print data=work.INVALID_MEMPTR_VIEW; run;

If you are submitting your program in batch mode, or to a Workspace Server or stored process server, the correct number of observations from the underlying table are read through the view. However, the SAS System option OBS is set to 0 and the program continues in syntax check mode. This mode of execution will occur when projects and jobs are run using SAS® Enterprise Guide®, SAS® Data Integration Studio, and other clients.

If you are submitting your program in an interactive mode, such as Display Manager Mode or Interactive Line Mode, the correct number of observations are read through the view and the program continues to run normally.

As a circumvention, use the appropriate SAS® or DBMS engine on the LIBNAME in the view definition. For example:

proc sql; create view work.INVALID_MEMPTR_VIEW AS select * from test.INVALID_MEMPTR_TEST using libname test BASE "C:\sasdata\tables"; run;

See SAS Note 19486 "'ERROR: Invalid memptr' occurs and the SAS® session becomes unresponsive when trying to access a view via a libref with the META LIBNAME engine" for a related problem.



Operating System and Release Information

Product FamilyProductSystemSAS Release
ReportedFixed*
SAS SystemBase SASz/OS9.1 TS1M3 SP49.3 TS1M0
Microsoft® Windows® for 64-Bit Itanium-based Systems9.1 TS1M3 SP49.3 TS1M0
Microsoft Windows Server 2003 Datacenter 64-bit Edition9.1 TS1M3 SP49.3 TS1M0
Microsoft Windows Server 2003 Enterprise 64-bit Edition9.1 TS1M3 SP49.3 TS1M0
Microsoft Windows XP 64-bit Edition9.1 TS1M3 SP49.3 TS1M0
Microsoft Windows 2000 Advanced Server9.1 TS1M3 SP4
Microsoft Windows 2000 Datacenter Server9.1 TS1M3 SP4
Microsoft Windows 2000 Server9.1 TS1M3 SP4
Microsoft Windows 2000 Professional9.1 TS1M3 SP4
Microsoft Windows NT Workstation9.1 TS1M3 SP4
Microsoft Windows Server 2003 Datacenter Edition9.1 TS1M3 SP49.3 TS1M0
Microsoft Windows Server 2003 Enterprise Edition9.1 TS1M3 SP49.3 TS1M0
Microsoft Windows Server 2003 Standard Edition9.1 TS1M3 SP49.3 TS1M0
Microsoft Windows XP Professional9.1 TS1M3 SP49.3 TS1M0
Windows Vista9.1 TS1M3 SP49.3 TS1M0
64-bit Enabled AIX9.1 TS1M3 SP49.3 TS1M0
64-bit Enabled HP-UX9.1 TS1M3 SP49.3 TS1M0
64-bit Enabled Solaris9.1 TS1M3 SP49.3 TS1M0
HP-UX IPF9.1 TS1M3 SP49.3 TS1M0
Linux9.1 TS1M3 SP49.3 TS1M0
Linux on Itanium9.1 TS1M3 SP49.3 TS1M0
OpenVMS Alpha9.1 TS1M3 SP49.3 TS1M0
Solaris for x649.1 TS1M3 SP49.3 TS1M0
Tru64 UNIX9.1 TS1M3 SP49.3 TS1M0
* For software releases that are not yet generally available, the Fixed Release is the software release in which the problem is planned to be fixed.